<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="/css/cart.css">
</head>
<body>
    <div class="backBox">
        <header>头部</header>
        <div class="cartHeader">
            <div class="left">
                <img src="/images/cartImg/log.png" alt="">
                <p>我的购物车</p>
            </div>
            <div class="right">
                <ul>
                    <li>①我的购物车</li>
                    <li>②填写核对订单</li>
                    <li>③成功提交订单</li>
                </ul>
            </div>
        </div>
            <div class="cartList">
                <div class="thead">
                    <ul>
                        <li>
                            <input type="checkbox" class="selectAll">
                            <span>全选</span>
                        </li>
                        <li>商品</li>
                        <li>单价</li>
                        <li>数量</li>
                        <li>小计</li>
                        <li>操作</li>
                    </ul>
                </div>
                <div class="tbody">
                </div>
                <script type="text/html" id="cartBrash">
                    {{each list item}}
                    <ul index={{item.id}}> 
                        <li>
                            <input type="checkbox" class="selectOne" checked="{{item.checked?'checked':''}} ">
                            <img src="{{item.image}}" alt="">
                        </li>
                        <li>{{item.title}}</li>
                        <li>¥{{item.price.toFixed(2)}}</li>
                        <li>{{item.count}}</li>
                        <li>¥{{(item.price * item.count).toFixed(2)}}</li>
                        <li class="deleteBtn" a={{item.id}}>删除</li>
                    </ul> 
                    {{/each}}
                </script>
            </div>
            <div class="sumBack">
                
            </div>
            <script type="text/html" id="sumBrash">
                    <div class="sumBox">
                        <div class="total">
                            <p>已选商品{{num}}件</p>
                            <b>总计：</b>
                            <span>{{sum}}元</span>
                        </div>
                        <div class="counts">
                            立即结算
                        </div>
                    </div>
            </script>
            <div class="alert">
                醒醒，你没钱
            </div>
        <footer>尾部</footer>
    </div>
    <script src="/lib/require.min.js" data-main="/js/cart.js"></script>
</body>
</html>